<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=9" />
		<meta http-equiv="pragma" content="no-cache" />
		<title>井冈山智慧社区官方网站</title>		
		<script type="text/javascript" src="js/head.js"></script>
		<style type="text/css">
			<!--nivo-slider插件设定图片高度的方法-->
			#slider .nivo-main-image{width:100% !important;height:250px !important;}
			#slider .nivo-slice,.nivo-slice img{height:250px !important;}			
		</style>
		
		<script type="text/javascript">
			var $ctx='<%=basePath%>';
			
			if('${data.parNav}'!=null && '${data.parNav}'!=''){					
				var $olda='#nav'+'${data.parNav}'; //选中导航
			}else{
				var $olda='#nav23'; //当前选中的 菜单 -默认是首页
			}
			
			
						
		    $(window).load(function() {		
		    	//导航菜单
		    	var time = null;
		    	var list = $("#navlist"); //一级菜单   		    	
		    	var lis = $("#navlist #navfouce li a");		    		
		    	var box = $("#navbox");//二级菜单
		    	var lista = $(".navfoucea");//有二级菜单的 a标签	
		    	
		    	$($olda+" a").addClass("now");
		    	$($olda+" a").siblings("b").css("display","block");		    	
		    
		    	//lis.eq($olda).addClass("now");
		    	//lis.eq($olda).siblings("b").css("display","block");
		    	
		    	for(var i=0,j=lis.length;i<j;i++){
		    		if(lis[i].className == "now"){
		    			olda = i;		    				
		    		}
		    	}				    		
		    	
		    	var box_show = function(hei){
		    		box.stop().animate({
		    			height:hei,
		    			opacity:1
		    		},400);
		    	}
		    	
		    	var box_hide = function(){
		    		box.stop().animate({
		    			height:0,
		    			opacity:0
		    		},400);
		    	}
		    	
		    	lis.hover(function(){ //a标签的over事件		
		    		lis.removeClass("now");
		    		lis.siblings("b").css("display","none");
		    		
		    		$(this).siblings("b").css("display","block");	
		    		$(this).addClass("now");	
		    	},function(){
		    		$(this).siblings("b").css("display","none");			    			
		    		$(this).removeClass("now");	
		    	;
		    			
		    		$($olda+" a").addClass("now");
			    	$($olda+" a").siblings("b").css("display","block");
		    	});
		    	
		    	lis.click(function(){ //a标签的over事件		
		    		lis.removeClass("now");
		    		lis.siblings("b").css("display","none");
		    		
		    		$(this).siblings("b").css("display","block");	
		    		$(this).addClass("now");
		    		
		    		var i = list.find("a").index($(this));
		    		$olda = i;	
		    	});
		    	
		    	lista.hover(function(){//出现二级菜单			
		    		clearTimeout(time);
		    		var index = list.find(".navfoucea").index($(this));			    			
		    		box.find(".cont").hide().eq(index).show();
		    		var _height = box.find(".cont").eq(index).height()+0;
		    		box_show(_height)
		    	},function(){
		    		time = setTimeout(function(){	
		    			box.find(".cont").hide();
		    			box_hide();
		    		},50);		    					    				
		    	});
		    	
		    	box.find(".cont").hover(function(){
		    		var _index = box.find(".cont").index($(this));
		    		
		    		lis.removeClass("now");
		    		lis.siblings("b").css("display","none");
		    		
		    		lista.eq(_index).addClass("now");
		    		lista.eq(_index).siblings("b").css("display","block");
		    		
		    		clearTimeout(time);
		    		$(this).show();
		    		var _height = $(this).height()+0;
		    		box_show(_height);
		    	},function(){
		    		time = setTimeout(function(){		
		    			$(this).hide();
		    			box_hide();
		    		},50);
		    		
		    		lis.removeClass("now");
		    		lis.siblings("b").css("display","none");
		    				
		    		$($olda+" a").addClass("now");
			    	$($olda+" a").siblings("b").css("display","block");			    			    	
		    	});
		    	
	            	        	 
		    });
		    
		    //网站搜索
		    function localSearch(){
		    	var searchTitle=$("#keywords").val();
		    	if($.trim(searchTitle)!=""){
		    		var url=$ctx+"/SiteIndex/searchInterface.htm?title="+searchTitle;           
			        window.location.href=url;	
		    	}else{
		    		alert("请输入查询关键字！");
		    	}		    	    	
		    }
		    
		    $(function(){		    	  
	    	  	$(".testWei").mouseover(function(e){
	    	      	$(".qr_tooldiv").show("fast");		    	   
	    	  	}).mouseout(function(){
	    	      	$(".qr_tooldiv").hide(); 
	    	  	});
		    });
		  	
    	</script>
	</head>
	<body>
	<!--Header Holder-->		
	<div class="header">
		<div class="opacity"></div>
		<div class="toptop">			
        	<div style="width:1204px; margin: 0 auto;  position:relative; ">           
            	<div style="float: left; width: 350px;z-index: 2;"> 
                 	 <label style=" letter-spacing: 0.5px;line-height:36px;">&nbsp;欢迎访问井冈山智慧社区！</label>                                  
            	</div>
            	<div class="topright">    
	            	<ul>            		
	            		<li>
	            			<a href="#" target="_blank">
	            				<img src="<%=basePath%>pages/WebSitePc/images/71-Mobile.png"  width="16" height="14" style=" vertical-align:middle;"/> 
	            				旧版官网
	            			</a>
	            		</li>
	            		<li class="nav-item">
	            			<img src="<%=basePath%>pages/WebSitePc/images/68-sina-weibo1.png"  width="16" height="16" style=" vertical-align:middle;"/>
	            			<a href="http://weibo.com/u/3894386931?refer_flag=1001030201_&is_hot=1" target="_blank"> 微博</a>
	            		</li>
	            		<li class="nav-item">
	            			<img src="<%=basePath%>pages/WebSitePc/images/49-tencent-mm.png"  width="16" height="16" style=" vertical-align:middle;"/>
	            			<a href="#" class="testWei" target="_blank"> 微信</a>
	            		</li>            		
	            	</ul>	            	
            	</div>
            	
            	<!--微信二维码-->   
		    	<div style="display: none;" class="qr_tooldiv">
		    		<img src="<%=basePath%>pages/WebSitePc/images/wei_xin.png" />
		    		<p>扫码关注</p>
		     	</div>
        	</div>
    	</div>
    	
     	<%--站点logo--%>
		<div class="site-logo"></div>   
		<!--头部 滚动图片-->       
        <div id="slider" style="height:250px;">                                  
        </div>
        <!--菜单开始-->  
        <div class="navmenu">
        	<div class="topnav">     
        		<!--一级菜单-->   	
        		<div id="navlist" class="list">
			        <ul id="navfouce">			    	         
			        </ul>
		        </div>
		       	<!--2级菜单-->  
		        <div style="opacity: 0; overflow: hidden;" id="navbox" class="box">
      			</div>
        	</div>        
        </div>    
        <!--通知公告 和搜索栏-->	
        <div class="bar">
			<div class="search">
				<a target="_blank" style="font-size: 12px; color:#000000"  href="<%=basePath%>/SiteIndex/siteMap.htm">网站地图</a>&nbsp;&nbsp; 				
				<input type="text" id="keywords" name="keywords" />
				<input type="button" class="btn" value="搜 索" onclick="javascript:localSearch();" name="" />
				<div class="wea">
					<img src="<%=basePath%>pages/WebSitePc/images/ico_10.png" />
					<span style="font-size: 12px; color:#000000" id="showtimes"></span>
					<!-- 最新公告 -->
					<div id="newNotice" class="newNotice" style="display: inline-block;margin-left:30px;">
						<img src="<%=basePath%>pages/WebSitePc/images/icon_news.png" />
						<font color="#ea5501">最新公告：</font>
					</div>
														
				</div>
			</div>
		</div>
	</div>
	
	</body>
</html>